[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILEINF(SEXP,IEXP) (BOOLEAN, DATE, INTEGER, STRING and TIME)

 Function
  Access a piece of information about a file.

 Syntax
  FILEINF(file,item)

   file = A string expression with the path and file name to access
          information about.
   item = An integer expression with the desired piece of information
          (1 through 9) to retrieve about file.

 Return Type & Value
  Returns a piece of information (specified by IEXP) about the file SEXP
  as follows:

   Return Type IEXP  Descripion
   ----------- ----  --------------------------------
   BOOLEAN       1   Return TRUE if file exists
   DATE          2   Return file date stamp
   TIME          3   Return file time stamp
   INTEGER       4   Return file size in bytes
   INTEGER       5   Return file attributes
                      01h = Read Only
                      02h = Hidden
                      04h = System
                      20h = Archive
   STRING        6   Return file drive letter (Letter only NO ":")
   STRING        7   Return file path         (\PATH\)
   STRING        8   Return file base name
   STRING        9   Return file extension

 Remarks
  This function is designed to return information about a file.  The file
  date, time, size and attributes are accessible from DOS.  In addition,
  this function can parse out the drive, path, base name and extension if
  needed from the complete file specification.  Finally, the EXIST()
  function is duplicated in FILEINF().

 Examples
  STRING file
  WHILE (FILEINF(file,1)) INPUT "File",file
  PRINTLN " Date: ",FILEINF(file,2)
  PRINTLN " Time: ",FILEINF(file,3)
  PRINTLN " Size: ",FILEINF(file,4)
  PRINTLN " Attr: ",FILEINF(file,5)
  PRINTLN "Drive: ",FILEINF(file,6)
  PRINTLN " Path: ",FILEINF(file,7)
  PRINTLN " Name: ",FILEINF(file,8)
  PRINTLN "  Ext: ",FILEINF(file,9)

See Also: EXIST()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson